package com.viknix.threadpool.manager.common.constant;

/**
 * @Author: Dongqi
 * @Date: 2021/10/29 10:11
 * @Version 1.0
 * @Description: Constants
 */
public class Constants {

    public static final String UNKNOWN = "unknown";

    public static final String POOL_ID = "poolId";

    public static final String ITEM = "item";

    public static final String NAMESPACE = "namespace";

    public static final String DEFAULT_NAMESPACE_ID = "public";

    public static final String BLANK = "";

    public static final String DOT = ".";

    public static final String COMMA_DIVISION = ",";

    public static final String TRUE_STR = "true";

    public static final String ENCODE = "UTF-8";

    // 长轮询时间为30s
    public static final int CONFIG_LONG_POLL_TIMEOUT = 30000;

    public static final char WORD_SEPARATOR_CHAR = (char) 2;

    public static final char LINE_SEPARATOR_CHAR = (char) 1;

    public static final String LINE_SEPARATOR = Character.toString((char) 1);

    public static final String WORD_SEPARATOR = Character.toString((char) 2);

    public static final String GENERAL_SPLIT_SYMBOL = ",";

    public static final String LONG_POLLING_LINE_SEPARATOR = "\r\n";

    public static final String BASE_PATH = "/tpm/v1";

    public static final String CONFIG_CONTROLLER_PATH = "/v1/configs";

    public static final String SERVER_CONFIG_CONTROLLER_PATH = "/v1/configs";

    public static final String CONFIG_REGISTER_PATH = CONFIG_CONTROLLER_PATH + "/register";

    public static final String LISTENER_PATH = CONFIG_CONTROLLER_PATH + "/listener";

    public static final String PROBE_MODIFY_REQUEST = "Listening-Configs";

    public static final String LONG_PULLING_TIMEOUT = "Long-Pulling-Timeout";

    public static final String LONG_PULLING_TIMEOUT_NO_HANGUP = "Long-Pulling-Timeout-No-Hangup";

    public static final String LISTENING_CONFIGS = "Listening-Configs";

    public static final String GROUP_KEY_DELIMITER = "+";

    public static final long EVICTION_INTERVAL_TIMER_IN_MS = 60 * 1000;

    public static final int SCHEDULED_THREAD_CORE_NUM = 1;

    public static final int MAP_INITIAL_CAPACITY = 16;

}
